package cn.springbook.common.core.config.auto;

import cn.springbook.common.core.config.serializer.LocalDateTimeSerializerConfig;
import cn.springbook.common.core.config.serializer.LongSerializerConfig;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

/**
 * <p>
 * 全局序列号配置
 * </p>
 *
 * @author: caifenglin
 * @date: 2021/7/7 11:02
 */
public class GlobalSerializerAutoConfig {

    @Bean
    @ConditionalOnMissingBean
    public LocalDateTimeSerializerConfig localDateTimeSerializerConfig(){
        return new LocalDateTimeSerializerConfig();
    }

    @Bean
    @ConditionalOnMissingBean
    public LongSerializerConfig longSerializerConfig(){
        return new LongSerializerConfig();
    }
}
